<template>
  <el-dialog :title="info.title" :visible.sync="visible" center width="1460px" :before-close="handleCancel">
    <div class="">
      <el-table v-loading="app.loading" ref="multipleTable" class="search-table" :data="list" border fit highlight-current-row style="width: 100%;">
        <el-table-column label="序号" align="center" width="56px">
          <template slot-scope="{$index}">
            {{ $index + 1 }}
          </template>
        </el-table-column>
        <el-table-column label="报销单号" width="190px">
          <template slot-scope="{row}">
            {{ 'POBX'+row.id }}
          </template>
        </el-table-column>
        <el-table-column label="公司名称" width="160px" prop="company" />
        <el-table-column label="部门" width="160px" prop="dept_name" />
        <el-table-column label="项目名称" width="260px" prop="pro_name" />
        <el-table-column label="项目类别" width="260px" prop="type" />
        <el-table-column label="用途说明" width="260px" prop="reason" />
        <el-table-column label="金额" align="right" width="110px">
          <template slot-scope="{row}">
            {{ app.toFix(row.money, 2) }}
          </template>
        </el-table-column>
        <el-table-column label="借款金额" align="right" width="110px">
          <template slot-scope="{row}">
            {{ app.toFix(row.pay_money, 2) }}
          </template>
        </el-table-column>
        <el-table-column label="申请人" width="160px" prop="nickname" />
        <el-table-column label="申请时间" align="center" width="140px" prop="apply_time" />
        <el-table-column label="备注" min-width="260px" prop="remark" />
      </el-table>
      <pagination v-show="filter.pageAll>0" :total="filter.pageAll" :page.sync="filter.pageCurrent" :limit.sync="filter.pageNumber" @pagination="getList" />
    </div>
  </el-dialog>
</template>

<script>
import page from '@/utils/page'
import { reims } from '@/api/finance/reimbursement'

export default {
  components: { },
  extends: page,
  inject: ['app'],
  props: {
    info: {
      type: Object,
      default: null
    },
    reqList: {
      default: reims,
      type: Function
    }
  },
  data() {
    return {
    }
  },
  watch: {
    visible(val) {
      if (val) {
        this.$set(this, 'form', this.info.edit)
        this.$set(this.filter, 'su_id', this.form.su_id)
        this.getList()
        this.$nextTick(() => {
          this.$refs.multipleTable.doLayout()
        })
      }
    },
    getData: {
      type: Function,
      default: function() {}
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style scoped>
</style>
